package com.shouxue.dragrvdemo;

import androidx.annotation.NonNull;

import com.desaysv.dragrvitem.adapter.holder.BaseViewHolder;
import com.desaysv.dragrvitem.adapter.holder.BaseViewHolderManager;

public class DragShortcutManager extends BaseViewHolderManager<BaseSVShortcutImp> {

    @Override
    public void onBindViewHolder(@NonNull BaseViewHolder holder, @NonNull BaseSVShortcutImp data) {
        MarqueeSwitch svSwitch = (MarqueeSwitch) holder.itemView;
        svSwitch.setText(data.getBaseTitle());
        svSwitch.setEditMode(true, data.isAdded());
        svSwitch.setDrawables(data.getIcon());
    }

    @Override
    protected int getItemLayoutId() {
        return R.layout.item_drag_marquee_switch;
    }
}
